home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.cbm
- Path: novice.uwaterloo.ca!dfevans
- From: dfevans@bbcr.uwaterloo.ca (David Evans)
- Subject: Re: calling BASIC from ML
- Sender: news@novice.uwaterloo.ca (Mr. News)
- Message-ID: <DowuHL.ECs@novice.uwaterloo.ca>
- Date: Wed, 27 Mar 1996 05:12:56 GMT
- References: <4jabc4$3oc@daily-planet.execpc.com>
- Nntp-Posting-Host: bcr.uwaterloo.ca
- Organization: University of Waterloo
-
- In article <4jabc4$3oc@daily-planet.execpc.com>, <ulthar@execpc.com> wrote:
- >I am writing a menu program for use with my CMD hard drive. It's written in Power C using
- >Rubens Abboud's windowing routines (with my mouse driver), and a machine language function
- >which, given the menu number as a parameter, loads and runs the specified choice. That may
- >sound kind of screwy, but it successfully loads and runs Dickenson's StereoPlayer, GEOS, and
- >the Power C shell.
- >
- >Now for the hard part. I want Novaterm on that menu, but since its loader is written in BASIC,
- >I don't know how to pass control to it. Can anyone tell me how to run a BASIC program from
- >machine language? I had to call IOINIT, CINT, and RESTOR to pry the Power C shell's icy fingers
- >from the machine.
- >
-
- My favourite cheesy approach to this is dynamic keyboarding. Print the LOAD
- commands to the screen (in the same colour as the background, if you like) with
- the proper spacing for the prompts. Then stick a home and the correct number
- of returns in the keyboard buffer, set the number of characters in the buffer
- to match, and then return to direct mode. This method is rather hoaky, but it
- gets the job done.
- I suppose you could use LOAD and then JMP to BASIC's run entry, but I've
- never tried this.
-
- --
- David Evans (NeXTMail OK) dfevans@bbcr.uwaterloo.ca
- Computer/Synth Junkie http://bbcr.uwaterloo.ca/~dfevans/
- University of Waterloo "Default is the value selected by the composer
- Ontario, Canada overridden by your command." - Roland TR-707 Manual
-